package com.taldh.design.patterns.chain.impl;

/**
 * date 2020/6/4
 *
 * @author 袁小黑
 * @version 1.0.0
 **/

public class SaleGrouper extends Handler  {
    public SaleGrouper(Handler next) {
        super(next);
    }

    @Override
    public void saleHouse(Request request) {
        if (request.getHouseNum() > 3 && request.getHouseNum() <= 10) {
            processHandle(request.getHouseNum());
        } else {
            super.saleHouse(request);
        }
    }

    @Override
    public String toString() {
        return "销售组长";
    }
}
